# coding=utf-8
import redis


class Config(object):
    DEBUG =True
    SECRET_KEY= "P8o2x2dMVQL6SRkaLUL1sD1UKPrZGjMktiOB1yTyqAY3VrT9sOa9biTLhiVfall9m8hT+cYf+44yOSguCJhk0w=="

    SQLALCHEMY_DATABASE_URI ='mysql://root:mysql@192.168.232.58/ihome28'
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    REDIS_HOST = '127.0.0.1'
    REDIS_PORT = 6379
    SESSION_TYPE = 'redis'
    SESSION_REDIS = redis.StrictRedis(host=REDIS_HOST,port=REDIS_PORT)
    SESSION_USE_SIGNER = True
    PERMANENT_SESSION_LIFETIME = 86400 * 2

class DevelopmentConfig(Config):
    DEBUG = True

class ProdutionConfig(Config):
    SQLALCHEMY_DATABASE_URI = 'mysql://root:mysql@192.168.232.58:3306/ihome'

config_dict = {
    'developmentconfig':DevelopmentConfig,
    'produtionconfig':ProdutionConfig
}